-- GENERATED SPELL FOR [Cohlien Frostweaver] --


function spell0_19545(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_19545', 8326, 1)
end

function spell1_19545(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(9672,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19545', 7000, 1)
end

function spell2_19545(pUnit, Event) --@Ice Barrier,Self--
pUnit:FullCastSpellOnTarget(33245,pUnit)
pUnit:RegisterEvent('Sorts_19545', 30313, 1)
end

function Sorts_19545(pUnit, Event)
local choix_sorts_19545 = math.random(0, 2)
if choix_sorts_19545 == 0 then
pUnit:RegisterEvent('spell0_19545', 1, 1)
end
if choix_sorts_19545 == 1 then
pUnit:RegisterEvent('spell1_19545', 1, 1)
end
if choix_sorts_19545 == 2 then
pUnit:RegisterEvent('spell2_19545', 1, 1)
end
end

function mob19545_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19545', math.random(1500, 3000), 1)
end

function mob19545_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19545_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19545_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19545, 1, 'mob19545_Action')
RegisterUnitEvent(19545, 2, 'mob19545_Leave')
RegisterUnitEvent(19545, 3, 'mob19545_Kill')
RegisterUnitEvent(19545, 4, 'mob19545_Die')
